
//
//  MineBusinessCardModel.m
//  Btpin
//
//  Created by Vic on 2019/4/7.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "MineBusinessCardModel.h"

@implementation MineBusinessCardModel

- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
    if (keyedValues[@"mine"]) {
        self.mine = [[MineBusinessCardBaseModel alloc] init];
        [self.mine setValuesForKeysWithDictionary:keyedValues[@"mine"]];
    }
    
    self.lists = [NSMutableArray arrayWithCapacity:0];
    if (keyedValues[@"lists"] && [keyedValues[@"lists"] count]) {
        for (NSDictionary *dic in keyedValues[@"lists"]) {
            MineBusinessCardBaseModel *model = [[MineBusinessCardBaseModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [self.lists addObject:model];
        }
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (id)copyWithZone:(NSZone *)zone {
    MineBusinessCardModel *model = [[[self class] allocWithZone:zone] init];
    
    model.mine = [self.mine copy];
    
    model.lists = [NSMutableArray arrayWithCapacity:0];
    if (self.lists && self.lists.count) {
        for (MineBusinessCardBaseModel *tempModel in self.lists) {
            MineBusinessCardBaseModel *model1 = [[MineBusinessCardBaseModel alloc] init];
            model1 = [tempModel copy];
            [model.lists addObject:model1];
        }
    }
    
    return model;
}

@end
